package com.kinyx.framework.db.sentence.res.demo.select.sql.method;

import org.junit.Test;

import com.kinyx.framework.db.sentence.res.demo.select.SELECT__SUPER;
import com.kinyx.test.entities.impl.DemoEntityR;

public class SELECT_Tester_SQL_select extends SELECT__SUPER {

	@Override
	protected boolean isSQL() { return true; }

	@Test
	public void test11() {
		final String sentence = "SELECT demoEntity.ID";
		final String str = "SQL: [" + sentence + "], params: []";
		this.test(//
				this.select.select(DemoEntityR.id), //
				sentence, str);
	}

	@Test
	public void test12() {
		final String sentence = "SELECT demoEntity.ID, demoEntity.USING_STATUS";
		final String str = "SQL: [" + sentence + "], params: []";
		this.test(//
				this.select.select(DemoEntityR.id, DemoEntityR.usingStatus), //
				sentence, str);
	}

	@Test
	public void test211() {
		final String sentence = "SELECT demoEntity.ID";
		final String str = "SQL: [" + sentence + "], params: []";
		this.test(//
				this.select.select(DemoEntityR.id), //
				sentence, str);
	}

	@Test
	public void test212() {
		final String sentence = "SELECT demoEntity1.ID";
		final String str = "SQL: [" + sentence + "], params: []";
		this.test(//
				this.select.select(DemoEntityR.id.idx(1)), //
				sentence, str);
	}

	@Test
	public void test221() {
		final String sentence = "SELECT demoEntity.ID AS id";
		final String str = "SQL: [" + sentence + "], params: []";
		this.test(//
				this.select.select(DemoEntityR.id.as("id")), //
				sentence, str);
	}

	@Test
	public void test222() {
		final String sentence = "SELECT demoEntity1.ID AS id";
		final String str = "SQL: [" + sentence + "], params: []";
		this.test(//
				this.select.select(DemoEntityR.id.idx(1).as("id")), //
				sentence, str);
	}

}
